package com.yunhe.common.model.device;

import java.util.HashMap;
import java.util.Map;

/**
 * 设备对象
 * @author liuronglei
 */
public class DeviceDTO extends HashMap<String, Object> {
    public String getType() {
        return (String)this.get("type");
    }
    public Long getId() {
        return ((Number)this.get("id")).longValue();
    }
    public Long getCode() {
        return (Long)this.get("code");
    }
    public String getName() {
        return (String)this.get("name");
    }
    public String getTitle() {
        return (String)this.get("title");
    }
    public Boolean getActivity() {
        return (Boolean)this.get("activity");
    }
    public Long getSn() {
        if (this.get("sn") != null) {
            return ((Number) this.get("sn")).longValue();
        } else {
            return null;
        }
    }
    public void setId(Long id) {
        this.put("id", id);
    }
    public void setCode(Long code) {
        this.put("code", code);
    }
    public void setName(String name) {
        this.put("name", name);
    }
    public void setTitle(String title) {
        this.put("title", title);
    }
    public void setType(String type) {
        this.put("type", type);
    }
    public void setActivity(Boolean activity) {
        this.put("activity", activity);
    }
    public void setSn(Long sn) {
        this.put("sn", sn);
    }
    public Map<String, Object> getDeviceType() {
        return (Map<String, Object>)this.get("deviceType");
    }
    public void setDeviceType(Map<String, Object> deviceTypeDTO) {
         this.put("deviceType", deviceTypeDTO);
    }

}
